/**
 * @author liangxi
 * @since 2023/12/21
 */

#ifndef DESIGNPATTERN_WHIP_H
#define DESIGNPATTERN_WHIP_H

#include <memory>
#include "../CondimentDecorator.h"

namespace Decorator {

    class Whip : public CondimentDecorator {
    public:
        explicit Whip(const std::shared_ptr<Beverage> &b) : beverage(b) {
        }

        double cost() override {
            return 0.10 + beverage->cost();
        }

        [[nodiscard]] const std::string getDescription() const override {
            return this->beverage->getDescription() + ",Whip";
        }

    private:

        std::shared_ptr<Beverage> beverage;
    };

} // Decorator

#endif //DESIGNPATTERN_WHIP_H
